#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void Insert(int arr[],int n)
{
	int m = 0;
	scanf("%d", &m);
	for (int i = 0; i < n-1; i++)
	{
		if (m > arr[i] && m <= arr[i + 1])
		{
			for (int j = n; j > i + 1; j--)
			{
				arr[j] = arr[j-1];
			}
			arr[i+1] = m;
			break;
		}
	}
}
void Print(int arr[], int n)
{
	for (int i = 0; i < n; i++)
	{
		printf("%d ", arr[i]);
	}
}
int main()
{
	int arr[11] = { 1,2,3,4,5,6,7,8,9,10 };
	Insert(arr,10);
	Print(arr, 11);
	return 0;
}